package com.xm.zcf.service.order;

import com.xm.zcf.dao.order.OrderDao;
import com.xm.zcf.domain.order.Orderitem;
import com.xm.zcf.domain.order.Orders;
import com.xm.zcf.util.PageBean;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * Created by Administrator on 2017/4/7.
 */
@Service
@Transactional
public class OrderServiceImpl implements OrderService{

    @Resource
    private OrderDao orderDao;
    @Override
    public void add(Orders model) {
        orderDao.save(model);
    }

    @Override
    public PageBean findByUid(Integer page, Integer limit, int uid) {
        return orderDao.findByUid(page,limit,uid);
    }

    @Override
    public Orders findByOid(String oid) {
        return orderDao.findByOid(oid);
    }

    @Override
    public void update(Orders orders) {
        orderDao.update(orders);
    }
}
